import React from 'react';
import PropTypes from 'prop-types';
import DefaultSingleList from '@welab/fx-ui/components/SingleList';
// import fn from '@welab/fx-ui/components/PlateformHalf';
import SystemIcon from './SystemIcon';
import { list } from '../theme';

const SingleList = props => (<DefaultSingleList {...props} iconComponent={SystemIcon} />);
SingleList.defaultProps = {
  icoArrow: false,
  noBottomBorder: false,
  frontIcon: null,
  labelRight: null,
  theme: list.singleList,
};
SingleList.propTypes = {
  /**
   * ### SingleList 属性说明
   *
   * 单行列表
   *
   * | Name | Type | Default | Details | isRequired |
   * | ------:| -----------:| -----------: | -----------: | ------:|
   * | theme | object | | 主题 | no |
   * | label | string | | 描述文字 | yes |
   * | labelRight | object | | 右侧文案和颜色 |
   * | frontIcon | object | | 标签前小图标 |
   * | icoArrow | bool | false | 向右箭头 | no |
   * | noBottomBorder | bool | false | 隐藏底部线条 |no|
   *
   * ### SingleList 代码示例(详见示例项目)
   *
   * ```html
   * <SingleList theme={SingleList} label="描述文字" />
   * ```
   */
  label: PropTypes.string.isRequired,
  labelRight: PropTypes.shape({
    text: PropTypes.string,
    color: PropTypes.string,
  }),
  theme: PropTypes.instanceOf(Object),
  icoArrow: PropTypes.bool,
  frontIcon: PropTypes.instanceOf(Object),
  noBottomBorder: PropTypes.bool,
};


export default SingleList;
